3.167 \(\int \frac{\sqrt{d \tan (e+f x)}}{a+i a \tan (e+f x)} \, dx\)

Optimal. Leaf size=81 \[ \frac{(-1)^{3/4} \sqrt{d} \tan ^{-1}\left (\frac{(-1)^{3/4} \sqrt{d \tan (e+f x)}}{\sqrt{d}}\right )}{2 a f}+\frac{i \sqrt{d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))} \]

[Out]

((-1)^(3/4)*Sqrt[d]*ArcTan[((-1)^(3/4)*Sqrt[d*Tan[e + f*x]])/Sqrt[d]])/(2*a*f) + ((I/2)*Sqrt[d*Tan[e + f*x]])/
(f*(a + I*a*Tan[e + f*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.11878, antiderivative size = 81, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.107, Rules used = {3549, 3533, 205} \[ \frac{(-1)^{3/4} \sqrt{d} \tan ^{-1}\left (\frac{(-1)^{3/4} \sqrt{d \tan (e+f x)}}{\sqrt{d}}\right )}{2 a f}+\frac{i \sqrt{d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[d*Tan[e + f*x]]/(a + I*a*Tan[e + f*x]),x]

[Out]

((-1)^(3/4)*Sqrt[d]*ArcTan[((-1)^(3/4)*Sqrt[d*Tan[e + f*x]])/Sqrt[d]])/(2*a*f) + ((I/2)*Sqrt[d*Tan[e + f*x]])/
(f*(a + I*a*Tan[e + f*x]))

Rule 3549

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[((
a*c + b*d)*(c + d*Tan[e + f*x])^n)/(2*(b*c - a*d)*f*(a + b*Tan[e + f*x])), x] + Dist[1/(2*a*(b*c - a*d)), Int[
(c + d*Tan[e + f*x])^(n - 1)*Simp[a*c*d*(n - 1) + b*c^2 + b*d^2*n - d*(b*c - a*d)*(n - 1)*Tan[e + f*x], x], x]
, x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && LtQ[0,
n, 1]

Rule 3533

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[(2*c^2)/f, S
ubst[Int[1/(b*c - d*x^2), x], x, Sqrt[b*Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x] && EqQ[c^2 + d^2, 0]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\sqrt{d \tan (e+f x)}}{a+i a \tan (e+f x)} \, dx &=\frac{i \sqrt{d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}-\frac{\int \frac{\frac{1}{2} i a d^2-\frac{1}{2} a d^2 \tan (e+f x)}{\sqrt{d \tan (e+f x)}} \, dx}{2 a^2 d}\\ &=\frac{i \sqrt{d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}+\frac{d^3 \operatorname{Subst}\left (\int \frac{1}{\frac{1}{2} i a d^3+\frac{1}{2} a d^2 x^2} \, dx,x,\sqrt{d \tan (e+f x)}\right )}{4 f}\\ &=\frac{(-1)^{3/4} \sqrt{d} \tan ^{-1}\left (\frac{(-1)^{3/4} \sqrt{d \tan (e+f x)}}{\sqrt{d}}\right )}{2 a f}+\frac{i \sqrt{d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}\\ \end{align*}

Mathematica [A]  time = 1.02128, size = 129, normalized size = 1.59 \[ \frac{\sqrt{d \tan (e+f x)} \left (\sqrt{i \tan (e+f x)}+(-1-i \tan (e+f x)) \tanh ^{-1}\left (\sqrt{\frac{-1+e^{2 i (e+f x)}}{1+e^{2 i (e+f x)}}}\right )\right )}{2 a f \sqrt{\frac{-1+e^{2 i (e+f x)}}{1+e^{2 i (e+f x)}}} (\tan (e+f x)-i)} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[d*Tan[e + f*x]]/(a + I*a*Tan[e + f*x]),x]

[Out]

((ArcTanh[Sqrt[(-1 + E^((2*I)*(e + f*x)))/(1 + E^((2*I)*(e + f*x)))]]*(-1 - I*Tan[e + f*x]) + Sqrt[I*Tan[e + f
*x]])*Sqrt[d*Tan[e + f*x]])/(2*a*Sqrt[(-1 + E^((2*I)*(e + f*x)))/(1 + E^((2*I)*(e + f*x)))]*f*(-I + Tan[e + f*
x]))

________________________________________________________________________________________

Maple [A]  time = 0.054, size = 69, normalized size = 0.9 \begin{align*}{\frac{d}{2\,fa \left ( -id+d\tan \left ( fx+e \right ) \right ) }\sqrt{d\tan \left ( fx+e \right ) }}+{\frac{d}{2\,fa}\arctan \left ({\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt{id}}}} \right ){\frac{1}{\sqrt{id}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*tan(f*x+e))^(1/2)/(a+I*a*tan(f*x+e)),x)

[Out]

1/2/f/a*d*(d*tan(f*x+e))^(1/2)/(-I*d+d*tan(f*x+e))+1/2/f/a*d/(I*d)^(1/2)*arctan((d*tan(f*x+e))^(1/2)/(I*d)^(1/
2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*tan(f*x+e))^(1/2)/(a+I*a*tan(f*x+e)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [B]  time = 1.97219, size = 807, normalized size = 9.96 \begin{align*} \frac{{\left (a f \sqrt{\frac{i \, d}{4 \, a^{2} f^{2}}} e^{\left (2 i \, f x + 2 i \, e\right )} \log \left ({\left ({\left (4 i \, a f e^{\left (2 i \, f x + 2 i \, e\right )} + 4 i \, a f\right )} \sqrt{\frac{-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt{\frac{i \, d}{4 \, a^{2} f^{2}}} - 2 i \, d e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}\right ) - a f \sqrt{\frac{i \, d}{4 \, a^{2} f^{2}}} e^{\left (2 i \, f x + 2 i \, e\right )} \log \left ({\left ({\left (-4 i \, a f e^{\left (2 i \, f x + 2 i \, e\right )} - 4 i \, a f\right )} \sqrt{\frac{-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt{\frac{i \, d}{4 \, a^{2} f^{2}}} - 2 i \, d e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}\right ) + \sqrt{\frac{-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}{\left (i \, e^{\left (2 i \, f x + 2 i \, e\right )} + i\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{4 \, a f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*tan(f*x+e))^(1/2)/(a+I*a*tan(f*x+e)),x, algorithm="fricas")

[Out]

1/4*(a*f*sqrt(1/4*I*d/(a^2*f^2))*e^(2*I*f*x + 2*I*e)*log(((4*I*a*f*e^(2*I*f*x + 2*I*e) + 4*I*a*f)*sqrt((-I*d*e
^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(1/4*I*d/(a^2*f^2)) - 2*I*d*e^(2*I*f*x + 2*I*e))*e^(-
2*I*f*x - 2*I*e)) - a*f*sqrt(1/4*I*d/(a^2*f^2))*e^(2*I*f*x + 2*I*e)*log(((-4*I*a*f*e^(2*I*f*x + 2*I*e) - 4*I*a
*f)*sqrt((-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(1/4*I*d/(a^2*f^2)) - 2*I*d*e^(2*I*f*
x + 2*I*e))*e^(-2*I*f*x - 2*I*e)) + sqrt((-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*(I*e^(2*I
*f*x + 2*I*e) + I))*e^(-2*I*f*x - 2*I*e)/(a*f)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*tan(f*x+e))**(1/2)/(a+I*a*tan(f*x+e)),x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [A]  time = 1.16613, size = 149, normalized size = 1.84 \begin{align*} \frac{1}{2} \, d^{2}{\left (\frac{\sqrt{2} \arctan \left (\frac{16 \, \sqrt{d^{2}} \sqrt{d \tan \left (f x + e\right )}}{8 i \, \sqrt{2} d^{\frac{3}{2}} + 8 \, \sqrt{2} \sqrt{d^{2}} \sqrt{d}}\right )}{a d^{\frac{3}{2}} f{\left (\frac{i \, d}{\sqrt{d^{2}}} + 1\right )}} + \frac{\sqrt{d \tan \left (f x + e\right )}}{{\left (d \tan \left (f x + e\right ) - i \, d\right )} a d f}\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*tan(f*x+e))^(1/2)/(a+I*a*tan(f*x+e)),x, algorithm="giac")

[Out]

1/2*d^2*(sqrt(2)*arctan(16*sqrt(d^2)*sqrt(d*tan(f*x + e))/(8*I*sqrt(2)*d^(3/2) + 8*sqrt(2)*sqrt(d^2)*sqrt(d)))
/(a*d^(3/2)*f*(I*d/sqrt(d^2) + 1)) + sqrt(d*tan(f*x + e))/((d*tan(f*x + e) - I*d)*a*d*f))